package emulator.support;

import emulator.hardware.HwWord;
import emulator.util.MemoryPtr;

public class IndirectAddressOperandEval implements OperandEval {

	MemoryPtr instruction;
	
	public IndirectAddressOperandEval(MemoryPtr ptr) {
		instruction = ptr; 
	}

	@Override
	public String getDetails(CpuState cpu_state) {
		int address = instruction.getWordOp();
		instruction.setAddress(address);
		int value = instruction.getWordOp();
		return "($" + new HwWord(address) + ") -> $" + new HwWord(value);
	}

}
